export default {
  getMenuList: state => {
    let menuList = state.menuList.map(v => {
      let item = {
        label: v.display_name,
        path: v.page_url,
        icon: v.page_url.slice(1),
      }
      if (v.role_tree_children && v.role_tree_children.length) {
        let children = v.role_tree_children.map(cv => {
          return {
            label: cv.display_name,
            path: cv.page_url,
            icon: cv.icon,
          }
        })
        item.children = children
      }
      return item
    })
   
    return menuList
  }
}